<?php
/**
 * Medical Monitoring Partner Grid.
 * This module will display the list of monitoring partners
 * 
 * @author Xavier VILAIN
 * @package Nawa\MedicalStudy\MedicalCenter\Monitoring
 * @license #license-nawa#
 * 
 */
use Fox\Behaviors;
use Fox\Generator;
use Nawa\Messages;
use Fox\Html\Button;
use Fox\Grid;
use Fox\Html\Block;

$xview = Xview::instance();
$keys = $xview->val(array('msid','mcid','monitoringid'));
$reload = $xview->val('reload');
// Load Grid Component
$block = $xview->component('medicalstudies','partners',$keys);
// Change Grid Behavior
$grid = $block->item('gPartners');
// Assign a partner to a center
$grid->footer()->item(Grid::BUTTON_ADD_RECORD)
			  ->label(Msg(Nawa\Messages::BUNDLE,Nawa\Messages::PARTNERS_ASSIGN));
// Unassign a partner from a center
$grid->footer()->item(Grid::BUTTON_DELETE_LINE)
				->color(Button::COLOR_RED)
			  ->label(Msg(Nawa\Messages::BUNDLE,Nawa\Messages::PARTNERS_UNASSIGN));
$grid->footer()->remove('assign');

return $block;